<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});


//网站后台路由配置
Route::get('/admin/login',"Admin\LoginController@login"); //加载后台登录界面
Route::post('/admin/dologin',"Admin\LoginController@doLogin"); //执行后台登录
Route::get('/admin/logout',"Admin\LoginController@logout"); //执行退出
//Route::get('/admin',"Admin\IndexController@index"); //后台首页
Route::get('/admin/getcode',"Admin\LoginController@getcode"); //加载验证码

Route::get('/home/index','Home\IndexController@index');//加载前端页面


//Route::get('admin/cate',"Admin\CateController@create");//后台商分类管理

//后台路由组
Route::group(['prefix' => 'admin','middleware' => 'admin'], function () {
    Route::get('/',"Admin\IndexController@index"); //后台首页
	//Route::resource('users', 'Admin\UsersController'); //后台会员管理
	Route::resource('/cate',"Admin\CateController");//后台分类管理
	Route::resource('/display','Admin\DisplayController');//前台首页图片处理
	Route::resource('/order','Admin\OrderController');//订单处理处理
	Route::resource('/orderdetail','Admin\OrderDetailController');//订单明细表处理
	
   	
});
